Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 1 of 2 for #944.
rstudio-library's ini helpers rendered a config file from a map, and Go templates iterate maps in sorted key order. For files whose behavior depends on the order of their sections or entries —/etc/rstudio/profiles,launcher.*.profiles.conf,launcher.*.resources.conf,repos.conf— that silently changes what the file does, and nothing invalues.yamlshows it.Part 2 (#953) bumps
rstudio-workbenchonto this, adds the deprecation warning, and updates the docs. It has to wait untilrstudio-library0.1.38 is published, since consumers resolve the library fromhelm.rstudio.comrather than the working tree.The ordered form
A file's contents may now be a list, rendered in the order written:
Previously a list rendered broken lines like
*=map[max-memory-mb:1024], with no section headers at all.Each entry holds exactly one key. That key names a
[section]when its value is a map, and an entry when it is not. An entry with more than one key, or none, is rejected — the shapes those produced were all unusable, and the error names the keys and shows where the-goes.A value is a single value, or a list of them. A list is comma-joined, which is how these files express several values for one option:
/etc/rstudio/profileshascpu-affinityand the AI provider allow/deny lists,launcher.*.profiles.confhasresource-profiles. A map has no representation — ini files have no nesting — and neither does a list holding maps or lists; both fail.At a file's top level, a list of maps still means several sections with the same name (
launcher.conf'scluster:), unchanged.A raw string is still passed through verbatim.
Collapsing the two ini renderers
profiles.iniwas a fork ofconfig.inithat added comma-joining and thejob-json-overridesencoding. That split meant the same YAML rendered differently depending on which file it was in — a list as an option's value comma-joined underconfig.profilesand was rejected underconfig.server.Both behaviors moved where they belong:
config.ini, at every depth, as above. It is a property of these file formats, not of one file.job-json-overridesencoding moved out of the renderer intoapply-everyone-and-default-to-others, which already rewrote those entries to add theirfilekey. It is a chart-level idea, not an ini one, so the renderer now only ever sees single values.With both in place,
profiles.ini.singleFile, the old multi-fileprofiles.ini, andcollapse-arrayare removed, and profiles files render throughconfig.inilike every other ini file.Breaking
rstudio-library.profiles.ini.advancedis renamed torstudio-library.profiles.ini— it is the only profiles helper now, so "advanced" meant nothing. Consumers update theirincludewhen they adopt 0.1.38.rstudio-connectpins 0.1.36 and is unaffected until it bumps; if missed, the failure is loud (no template … associated), not silent.apply-everyone-and-default-to-otherstakes afilekey and renders the whole file, rather than its caller emitting thename: |header.lint/, orci/file in this repo uses that shape, andrserver.conf's option schema has no list-typed options.chronicle-local.gcfgis the one format that genuinely supports repeated keys, but it cannot express them through this renderer today either — see chronicle-local.gcfg is rendered as ini, and its values are never quoted #954.key=map[a:1]. Confirmed harmless for Chronicle, whose config struct has nomap[...]field and therefore no gcfg subsections.Testing
other-charts/rstudio-library-testcovers, forconfig.iniand the profiles helpers:launcher.conf'scluster:)job-json-overridesmerging and the JSON payloads it generates94 tests pass. Rendering every values file under
charts/*/lint/andcharts/*/ci/is unchanged except where a previously-broken shape now renders correctly.